package com.wordlearning.app.repository;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wordlearning.app.entity.VoiceSetting;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Optional;

@Mapper
public interface VoiceSettingRepository extends BaseMapper<VoiceSetting> {

    public Optional<VoiceSetting> findByUserId(Long userId);
    
    // 根据ID查询语音设置
    public Optional<VoiceSetting> selectById(Long id);
    
    // 查询所有语音设置
    public List<VoiceSetting> selectList();
    
    // 批量查询语音设置
    public List<VoiceSetting> selectBatchIds(List<Long> ids);
    
    // 新增语音设置
    public int insert(VoiceSetting voiceSetting);
    
    // 更新语音设置
    public int updateById(VoiceSetting voiceSetting);
    
    // 删除语音设置
    public int deleteById(Long id);
    
    // 批量删除语音设置
    public int deleteBatchIds(List<Long> ids);
    
    // 检查语音设置是否存在
    public boolean existsById(Long id);

}